package com.tao.base.exception;

import lombok.Data;

/**
 * <p>
 * 自定义异常
 * </p>
 *
 * @author taohongrun
 * @since 2024/11/4
 */

public class LearnHubException extends RuntimeException{
    private String message;

    public LearnHubException(String message) {
        super(message);
        this.message = message;
    }

    public static void throwMyException(String message){
        throw new LearnHubException(message);
    }

    public static void throwMyException(CommonError commonError){
        throw new LearnHubException(commonError.getErrMessage());
    }
}
